Optimal. Leaf size=150 \[ \frac {b \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^2 d (1+n)}-\frac {2 b^3 \, _2F_1\left (4,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^4 d (1+n)}+\frac {b^5 \, _2F_1\left (6,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^6 d (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3959, 186, 67}
\begin {gather*} \frac {b^5 (a+b \sec (c+d x))^{n+1} \, _2F_1\left (6,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a^6 d (n+1)}-\frac {2 b^3 (a+b \sec (c+d x))^{n+1} \, _2F_1\left (4,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a^4 d (n+1)}+\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a^2 d (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 186
Rule 3959
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^n \sin ^5(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {(-1+x)^2 (1+x)^2 (a-b x)^n}{x^6} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {(a-b x)^n}{x^6}-\frac {2 (a-b x)^n}{x^4}+\frac {(a-b x)^n}{x^2}\right ) \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{x^6} \, dx,x,-\sec (c+d x)\right )}{d}-\frac {\text {Subst}\left (\int \frac {(a-b x)^n}{x^2} \, dx,x,-\sec (c+d x)\right )}{d}+\frac {2 \text {Subst}\left (\int \frac {(a-b x)^n}{x^4} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac {b \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^2 d (1+n)}-\frac {2 b^3 \, _2F_1\left (4,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^4 d (1+n)}+\frac {b^5 \, _2F_1\left (6,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a^6 d (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(562\) vs. \(2(150)=300\).
time = 5.61, size = 562, normalized size = 3.75 \begin {gather*} -\frac {\cos ^6\left (\frac {1}{2} (c+d x)\right ) \cos (c+d x) \left (192 a^3 (-1+n) (b+a \cos (c+d x))^2-240 a^3 (-1+n) (b+a \cos (c+d x))^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )-24 a^2 (2 a-b (-4+n)) (-1+n) (b+a \cos (c+d x))^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )+40 a^2 (2 a-b (-3+n)) (-1+n) (b+a \cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )+a (1-n) \left (96 a^2+4 a b (6-4 n)-4 b^2 \left (12-7 n+n^2\right )\right ) (b+a \cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )-10 a \left ((-1+n) \left (-14 a^2+2 a b (-1+n)+b^2 \left (6-5 n+n^2\right )\right ) (b+a \cos (c+d x))^2+b \left (24 a^3+12 a^2 b (-1+n)-4 a b^2 \left (2-3 n+n^2\right )-b^3 \left (-6+11 n-6 n^2+n^3\right )\right ) \, _2F_1\left (2,1-n;2-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )\right ) \sec ^6\left (\frac {1}{2} (c+d x)\right )+\left ((-1+n) \left (-84 a^3+2 a^2 b (18-7 n)+4 a b^2 \left (9-9 n+2 n^2\right )+b^3 \left (-24+26 n-9 n^2+n^3\right )\right ) (b+a \cos (c+d x))^2+b \left (120 a^4+120 a^3 b (-1+n)-10 a b^3 \left (-6+11 n-6 n^2+n^3\right )-b^4 \left (24-50 n+35 n^2-10 n^3+n^4\right )\right ) \, _2F_1\left (2,1-n;2-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )\right ) \sec ^6\left (\frac {1}{2} (c+d x)\right )\right ) (a+b \sec (c+d x))^n}{120 a^4 d (-1+n) (b+a \cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.35, size = 0, normalized size = 0.00 \[\int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\sin ^{5}\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\sin \left (c+d\,x\right )}^5\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________